import axiosApi from './AxiosApi.js'
export default {
  selectAcquisitionTask(data) {
    return axiosApi({
      method: 'POST',
      url: '/SpglAcquisitionTask/selectAcquisitionTask',
      data
    })
  },
  selectVideoByTask(taskId) {
    return axiosApi({
      method: 'GET',
      url: '/SpglAcquisitionTask/selectVideoByTask/' + taskId
    })
  },
  deleteTask(taskId) {
    return axiosApi({
      method: 'GET',
      url: `/SpglAcquisitionTask/delete/${taskId}`
    })
  },
  //扫描串口信息
  scanSerialPort() {
    return axiosApi({
      url: '/scanSerialPort',
      method: 'POST'
    })
  },
  //一键连接
  connection(data) {
    return axiosApi({
      method: 'POST',
      url: '/connection',
      data
    })
  },
  //一键断开
  disconnect(data) {
    return axiosApi({
      method: 'get',
      url: '/disconnect',
      data
    })
  },
  //开始复现
  startReproduction(taskId) {
    return axiosApi({
      method: 'GET',
      url: '/startReproduction/' + taskId
    })
  },
  //获取设备参数
  selecDevicetList(data) {
    return axiosApi({
      method: 'POST',
      url: '/spglCollectArgument/selectList',
      data
    })
  },
  //根据采集任务id获取采集参数列表
  selectByIds(data) {
    return axiosApi({
      method: 'POST',
      url: '/spglJoystickData/selectByIds',
      data
    })
  },
  //设置设备参数采集状态
  updateListDevicetList(data) {
    return axiosApi({
      method: 'POST',
      url: '/spglCollectArgument/updateList',
      data
    })
  },
  //获取任务下设备
  getEquipment(taskId) {
    return axiosApi({
      method: 'GET',
      url: '/spglCollectArgument/getEquipment/' + taskId
    })
  }
}
